import request from '../utils/request'


export function fetchList(query) {
    return request({
        url: '/admin/player',
        method: 'get',
        params: query
    })
}

export function deleteRecord(query){
    return request({
        url: '/admin/player/remove',
        method: 'get',
        params: query
    })
}


export function frozenRecord(query){
    return request({
        url:'/admin/player/frozen?type=1',
        method:'get',
        params:query
    });
}

export function unFrozenRecord(query){
    return request({
        url:'/admin/player/frozen',
        method:'get',
        params:query
    });
}

export function updateVotedCount(data){
    return request({
        url:'/admin/player/updateVotedCount',
        method:'post',
        data
    });
}


export function fetchApplyList(query){
    return request({
        url: '/admin/player/applylist',
        method: 'get',
        params: query
    })
}

//审核通过
export function authRecord(data){
    return request({
        url:'/admin/player/auth?type=1',
        method:'post',
        data
    });
}

//拉黑
export function defriendPlayer(data){
    return request({
        url:'/admin/player/auth?type=3',
        method:'post',
        data
    });
}

/**
 * 驳回审核
 */
export function unAuthRecord(data){
    return request({
        url:'/admin/player/auth?type=2',
        method:'post',
        data
    });
}

export function fetchVoteList(params){
    return request({
        url:'/admin/player/voteList',
        method:'get',
        params
    })
}